package com.hxkcloud.nurse.views;

import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.hxkcloud.nurse.R;

/**
 * Created by Administrator on 2017/3/26.
 */
public class CustomDialog extends Dialog{
    private  TextView tv_title;
    private   TextView positive_textview;
    private   TextView negative_textview;
    public CustomDialog(Context context) {
        super(context,R.style.CustomDialog);
        setCustomDialog();
    }
    private void setCustomDialog() {
        View view = LayoutInflater.from(getContext()).inflate(R.layout.customdialog_layout,null);
        tv_title = (TextView) view.findViewById(R.id.text_title);
        positive_textview = (TextView) view.findViewById(R.id.text_positive);
        negative_textview = (TextView) view.findViewById(R.id.text_negative);
       super.setContentView(view);
    }
    @Override
    public void setContentView(int layoutResID) {
    }
    @Override
    public void setContentView(View view, ViewGroup.LayoutParams params) {
    }
    @Override
    public void setContentView(View view) {
    }
    public void setOnPositiveListener(View.OnClickListener listener){
        positive_textview.setOnClickListener(listener);
    }
    public void setOnNegativeListener(View.OnClickListener listener){
        negative_textview.setOnClickListener(listener);
    }
}
